<template>
    <view class="user" :style=" { paddingTop: paddingHeight + 'px' } ">
        <nav-bar></nav-bar>
        <view class="title">
            <text>意见反馈回复</text>
            <image class="bg-img" 
			    src="http://oss.antaimedical.com/images/pro/2024/10/671f2bcbe4b0d615350f30a5Q2w5YGoBIBf28175ee40296047d638ebf9d45392ecec.png"
			    ></image>
        </view>
        <view class="content">
            <view class="item">
                <view class="label-box">
                    意见反馈编号
                </view>
                <view class="text">{{ detailData.feedbackNum }}</view>
            </view>
            <view class="item">
                <view class="label-box">
                    类型
                </view>
                <view class="text">{{ detailData.typeName }}</view>
            </view>
            <view class="item border">
                <view class="label-box">
                    板块
                </view>
                <view class="text">{{ detailData.moduleName }}</view>
            </view>
            <view class="detiil">
                <view class="detiil-label">
                    意见详情描述
                </view>
                <view class="text">{{ detailData.feedbackDetail }}</view>
            </view>
            <view class="detiil">
                <view class="detiil-label">
                    客服回复内容
                </view>
                <view class="text">{{ detailData.replyContent || '' }}</view>
            </view>
        </view>
        <view class="bottom-box" @click="goBack">
                <view class="text">如需人工处理，可以在【我的】菜单中，点击【联系客服】获取客服企业微信</view>
                <view class="bottom-btn">返回</view>
            </view>
    </view>
</template>

<script>
import {
    findUserFeedbackReply
} from '@/api/index.js'
export default {
    data () {
        return {
            paddingHeight: uni.getStorageSync('navbarHeight'),
            userId: uni.getStorageSync('userId'),
            detailData:{},
        }
    },

    onLoad (OPTIONS) {
        this.detailData =JSON.parse(OPTIONS.detailData) 
        this.init()
        
    },
    methods: {
        init () {
            if (this.detailData.isReply == 1) {
                findUserFeedbackReply({id:this.detailData.id}).then((res) => {
                    this.detailData.replyContent = res.data.replyContent
                }).catch((err) => {
    
                })
            }
        },
        goBack () {
            uni.navigateBack({
                delta: 1 // 默认值是1，表示回到上一页
            });
        },
    }
}
</script>

<style lang="scss" scoped>
.user {
    min-height: 100vh;
    background: #E3E8FF;
    padding: 0 48rpx 48rpx;

    .title {
        font-family: PingFang SC, PingFang SC;
        font-weight: 500;
        font-size: 48rpx;
        color: #333333;
        margin: 48rpx 0 32rpx 0;
        text-align: left;
        position: relative;
        .bg-img{
            width: 200rpx;
            height: 200rpx;
            position: absolute;
            right: 0;
            top: -32rpx;
            z-index: 1;
        }
    }
    .content{
        background: rgba($color: #ffffff, $alpha: .9);
        padding: 32rpx;
        border-radius: 24rpx 24rpx 24rpx 24rpx;
        position: relative;
        z-index: 2;
        .item{

            display: flex;
            justify-content: space-between;
            align-items: center;
            padding-bottom: 32rpx;
            font-family: PingFang SC, PingFang SC;
            font-weight: 400;
            font-size: 28rpx;
            color: #666666;
            .text{
                font-family: Arial, Arial;
                color: #333333;
            }
        }
        .border{
            border-bottom: 2rpx solid #E6EBF5;
        }
        .detiil{
            margin-top: 32rpx;
            .detiil-label{
                margin-top: 32rpx;
                font-family: PingFang SC, PingFang SC;
                font-weight: 400;
                font-size: 28rpx;
                color: #666666;
                text-align: left;
            }
            .text{
                text-align: left;
                margin-top: 32rpx;
                font-family: PingFang SC, PingFang SC;
                font-weight: 400;
                font-size: 28rpx;
                color: #333333;
            }
        }
    }
    .bottom-box{
        width: 686rpx;
        margin-top: 52rpx;
        position: fixed;
        left: 50%;
        bottom: 68rpx;
        transform: translateX(-50%);
        .text{
            font-family: PingFang SC, PingFang SC;
            font-weight: 400;
            font-size: 24rpx;
            color: #666666;
            text-align: left;
        }
        .bottom-btn{
            display: flex;
            justify-content: center;
            align-items: center;
            width: 100%;
            height: 88rpx;
            font-family: PingFang SC, PingFang SC;
            font-weight: 500;
            font-size: 32rpx;
            color: #FFFFFF;
            background: #545DDE;
            border-radius: 32rpx 32rpx 32rpx 32rpx;
            margin-top: 10rpx;
        }
    }
}
</style>